﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        int clickeditem = 0;
        int progress = 0;
        int argb = 255;
        int a = 5;
        List<object> pix = new List<object>();
        
        
    
        public Form1()
        {
            pix.Add(global::WindowsFormsApplication1.Properties.Resources._15);
            pix.Add(global::WindowsFormsApplication1.Properties.Resources._13);
            pix.Add(global::WindowsFormsApplication1.Properties.Resources._12);
        
            InitializeComponent();
            this.DoubleBuffered = true;

        }


        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Interval = 100;
            progress++;
            

            if (progress < 30)
            {
                argb = argb - 4;
                //pictureBox1.Image = (Image)pix[clickeditem];
                pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._13;
                Graphics g = Graphics.FromImage(pictureBox1.Image);
                SolidBrush b = new SolidBrush(Color.FromArgb(argb, 0, 0, 0));

                g.FillRectangle(b, 0, 0, 371, 246);
                pictureBox1.Refresh();
            }
            else if (progress > 30 && progress < 50)
            {
                argb = argb - 6;
             //   pictureBox1.Image = (Image)pix[clickeditem];
                pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._13;
                Graphics g = Graphics.FromImage(pictureBox1.Image);
                SolidBrush b = new SolidBrush(Color.FromArgb(argb, 0, 0, 0));

                g.FillRectangle(b, 0, 0, 371, 246);
                pictureBox1.Refresh();
            }
           else
            {
                a = a + 5;
               pictureBox1.Image = (Image)pix[clickeditem];
                Graphics g = Graphics.FromImage(pictureBox1.Image);
                SolidBrush b1 = new SolidBrush(Color.FromArgb(a, 0, 0, 0));

                g.FillRectangle(b1, 0, 0, 371, 246);
                pictureBox1.Refresh();
            }
         
           
 
        }

        
        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true;
           
            clickeditem++;

         /* switch (clickeditem)

            {
                case 1:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._15;
                    break;
                case 2:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._13;
                    break;
                case 3:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._12;
                    break;
             /*   case 4:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._13;
                    break;
                case 5:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._14;
                    break;
                case 6:
                    pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources._18;
                    break;*/

            }

        private void Form1_Load(object sender, EventArgs e)
        {
        
        }
            
        }



        



       
}
